Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ v2.1.0 Upgrade webterm to xterm.js. #147

Merged
merged 11 commits into from
Nov 6, 2023
Merged

⚡️ v2.1.0 Upgrade webterm to xterm.js. #147

merged 11 commits into from
Nov 6, 2023

Conversation

bmeares
Copy link
Owner

@bmeares bmeares commented Nov 6, 2023

v2.1.0

  • Replace term.js with xterm.js.
    This has been a long time coming. The webterm has been migrated to xterm.js which has continuous support from term.js which was last updated almost 10 years ago.

  • Deprecate the legacy web pseudo-terminal.
    Clicking the "Execute" button on the web console will now execute the command directly in the webterm. Additionally, changing the instance select will now automatically switch the webterm's context to the desired instance.

  • Fix an issue when starting existing jobs.
    A bug has been fixed which prevented jobs from restarting specifically by name.

  • Add MRSM_VENVS_DIR.
    Like MRSM_PLUGINS_DIR, you can now designate a virtual environments directory separate from the root directory. This is particularly useful for production deployments, and MRSM_VENVS_DIR has been set to /home/meerschaum/venvs in the official Docker images to allow for mounting /meerschaum to persistent volumes.

  • Allow syncing NULL values into indices.
    Syncing None within an index will now be coalesced into a magic value when applying updates.

    import meerschaum as mrsm
    
    pipe = mrsm.Pipe(
        'allow', 'null', 'indices',
        instance = 'sql:local',
        columns = ['a', 'b'],
    )
    pipe.sync([{'a': 1, 'b': 1}])
    pipe.sync([{'b': 1}])
    pipe.sync([{'a': 1}])
    pipe.sync([{'c': 1}])
    
    print(pipe.get_data())
    #       a     b     c
    # 0  <NA>  <NA>     1
    # 1  <NA>     1  <NA>
    # 2     1  <NA>  <NA>
    # 3     1     1  <NA>
  • Syncing Decimal objects will now enforce numeric dtypes.
    For example, syncing a Decimal onto a integer column will update the dtype to numeric, like when syncing a float after an integer.

    import meerschaum as mrsm
    from decimal import Decimal
    
    pipe = mrsm.Pipe(
        'demo', 'decimal', 'coersion',
        instance = 'sql:local',
        columns = ['id'],
    )
    pipe.sync([{'id': 1, 'foo': 10}])
    pipe.sync([{'id': 1, 'foo': Decimal('20')}])
    print(pipe.dtypes)
    # {'id': 'int64[pyarrow]', 'foo': 'numeric'}
    
    df = pipe.get_data()
    print(f"{df['foo'][0]=}")
    # df['foo'][0]=Decimal('20') 
  • Improve IS NULL and IS NOT NULL checks for params.
    Mixing null-like values (e.g. NaN, <NA>, None) in params will now separate out nulls.

    from meerschaum.utils.sql import build_where
    print(build_where({'a': ['_<NA>', '_1', '_2']}))
    # WHERE
    #   ("a" NOT IN ('1', '2')
    #   AND "a" IS NOT NULL)
    print(build_where({'a': ['NaN', '1', '2']}))
    # WHERE
    #   ("a" IN ('1', '2')
    #   OR "a" IS NULL)
  • Add colors to mrsm show columns.

  • Fix a unicode decoding error when showing logs.

  • Remove xstatic dependencies.
    The xterm.js files are now bundled as static assets, so the term.js files are no longer needed. Hurray for removing dependencies!

  • Other bugfixes.
    A handful of minor bugfixes have been included in this release:

    • Removed non-connector environment variables like MRSM_WORK_DIR from the mrsm show connectors output.
    • Improving symlinks handling for multi-processed situations (mrsm start api).

@bmeares bmeares changed the title v2.1.0 ⚡️ v2.1.0 Upgrade webterm to xterm.js. Nov 6, 2023
@bmeares bmeares merged commit 53174a0 into main Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant